package com.liam.chinesevietnamesecorpus.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.liam.chinesevietnamesecorpus.common.BaseEntity;
import lombok.Getter;
import lombok.Setter;

/**
 * 用户实体类
 * 
 * @author Liam
 */
@TableName("user")
@Getter
@Setter
public class User extends BaseEntity {

    /**
     * 用户ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 用户名
     */
    private String username;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 密码（JSON序列化时忽略）
     */
    @JsonIgnore
    private String password;

    /**
     * 角色：admin, editor, user
     */
    private String role;

    /**
     * 状态：active, inactive, locked
     */
    private String status;
}
